
                    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
                        <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path>
                    </svg>
                    <blockquote> 
 <p><strong>高级的题库更新之后，专业性更强了，不是真正从事这一行的，很难做出来。本人就是个小菜鸡，有一些题，我也不想不明白。题目的答案我尽可能的找到出处，如果读者发现错误或有补充建议，欢迎评论或私信笔者。笔者这篇就当抛砖引玉，各位读者可以当作考试的一个参考</strong></p> 
</blockquote> 
<h4><a name="t0"></a><a id="HarmonyOShttpsblogcsdnnetGusha_articledetails140072321spm1001201430015502_5"></a>基础认证题库请移步：<a href="https://blog.csdn.net/Gusha_/article/details/140072321?spm=1001.2014.3001.5502">HarmonyOS应用开发者基础认证题库</a></h4> 
<hr> 
<h3><a name="t1"></a><a id="20_8"></a><code>注：有读者反馈，题库的代码块比较多，打开文章时会卡死。所以笔者将题库拆分，以20道题为一组，题库目录如下，读者可以按需跳转。如果对您的阅读产生不便，笔者在这里向大家说声抱歉，请各位读者原谅。该题库已整理完毕，笔者不再更新。笔者连续考了三次，都过了，所以答案应该没什么太大问题。有需要题库文档的可以自取。祝各位读者好运(๑¯ω¯๑)。</code></h3> 
<h2><a name="t2"></a><a id="_10"></a>序号目录：</h2> 
<ul><li>单选题<br> <a href="https://blog.csdn.net/Gusha_/article/details/140295266?spm=1001.2014.3001.5502">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号1</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140580616?spm=1001.2014.3001.5501">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号2</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140580633?spm=1001.2014.3001.5501">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号3</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140617294">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号4</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140749409?spm=1001.2014.3001.5502">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号5</a></li><li>多选题<br> <a href="https://blog.csdn.net/Gusha_/article/details/140580653?spm=1001.2014.3001.5501">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 多选题序号1</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140580668?spm=1001.2014.3001.5501">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 多选题序号2</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140613052?spm=1001.2014.3001.5502">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 多选题序号3</a></li><li>答案纯享版<br> <a href="https://blog.csdn.net/Gusha_/article/details/140676104?spm=1001.2014.3001.5502">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 答案纯享版</a></li></ul> 
<hr> 
<h4><a name="t3"></a><a id="httpspanbaiducoms153tDk4dVv_MmLEyzOqW9hQpwdxkgr_24"></a>题库文档链接（自取）：https://pan.baidu.com/s/153tDk4dVv_MmLEyzOqW9hQ?pwd=xkgr</h4> 
<hr> 
<h2><a name="t4"></a><a id="_27"></a>注：题目是乱序，每次考试，选项的顺序都不同</h2> 
<h3><a name="t5"></a><a id="_09_095_29"></a>单选题题库 - 序号5</h3> 
<hr> 
<p>81、开发者在编写ArkUI代码时，想要提前预览下所编写的组件的效果，下述哪个组件可以使用DevEco Studio Previewer正常预览？</p> 
<pre data-index="0" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	A</span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Preview</span></span> 
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span> 
struct LinkSample <span class="token punctuation">{<!-- --></span> 
  <span class="token decorator"><span class="token at operator">@</span><span class="token function">Link</span></span> message<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span> 
  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span> 
    <span class="token function">Text</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>message<span class="token punctuation">)</span> 
  <span class="token punctuation">}</span> 
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.431837;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:0,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="1" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	B</span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Preview</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct ConsumeSample <span class="token punctuation">{<!-- --></span>
  <span class="token decorator"><span class="token at operator">@</span><span class="token function">Consume</span></span> name<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span>
  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Text</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>name<span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.431837;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:1,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="2" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">// C</span>
<span class="token keyword">import</span> <span class="token punctuation">{<!-- --></span> add <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'libnative.so'</span><span class="token punctuation">;</span>

<span class="token decorator"><span class="token at operator">@</span><span class="token function">Preview</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct NativeSample <span class="token punctuation">{<!-- --></span>
  count<span class="token operator">:</span> <span class="token builtin">number</span> <span class="token operator">=</span> <span class="token function">add</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Text</span><span class="token punctuation">(</span><span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">current count is </span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${<!-- --></span><span class="token keyword">this</span><span class="token punctuation">.</span>count<span class="token interpolation-punctuation punctuation">}</span></span><span class="token template-punctuation string">`</span></span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.431837;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:2,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="3" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	D</span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Preview</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span> 
struct TitleSample <span class="token punctuation">{<!-- --></span> 
  <span class="token decorator"><span class="token at operator">@</span><span class="token function">StorageProp</span></span><span class="token punctuation">(</span><span class="token string">'title'</span><span class="token punctuation">)</span> title<span class="token operator">:</span> <span class="token builtin">string</span> <span class="token operator">=</span> <span class="token string">'PlaceHolder'</span><span class="token punctuation">;</span>
  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span> 
    <span class="token function">Text</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>title<span class="token punctuation">)</span> 
  <span class="token punctuation">}</span> 
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.431837;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:3,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ A、A</p> 
<p>​ B、B</p> 
<p>​ C、C</p> 
<p>​ <code>D、D</code></p> 
<hr> 
<p>82、ArkUI组件复用的作用机制是减少了什么时间从而降低了丢帧率？</p> 
<p>​ A、数据挂载时间</p> 
<p>​ B、组件销毁时间</p> 
<p>​ C、组件节点渲染时间</p> 
<p>​ <code>D、组件节点和对象的创建时间</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/best-practices-V5/bpta-component-reuse-V5" rel="nofollow">组件复用最佳实践-开发高性能ArkUI-性能优化-性能 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>83、关于代码门禁理解正确的是：</p> 
<p><code>A、代码门禁则是在代码合并之前就验证代码来保护主干分支的完整性。通过这种方式，可以保护主分支代码避免因合码导致的构建中断，以确保master分支代码始终是可部署的，并且不会因明显的错误而影响到你正在并行开发的同事工作。</code></p> 
<p>B、门禁级检查的范围和版本级检查的范围保持一 致，尽可能多的在MR[禁阶段就拦截防护住问题，保障问题可以及时清理掉。</p> 
<p>C、代码门禁是一项代码质量保障措施。目的是要求开发人员提交的代码必须满足一些要求才 能合入代码仓库。门禁必须强制要求包括编译通过、<span class="edu-hl hl hl-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;单元测试\&quot;}&quot;}" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;单元测试\&quot;}&quot;}" data-tit="单元测试" data-pretit="单元测试">单元测试</span>覆盖率达标、代码静态检查无告警、全量功能测试用例、DFX专项测试都通过。</p> 
<p>D、标准CI构建是在代码合并后检查已提交代码的功能完整性，这种方法会导致代码合并到master后编译失败导致没有可用版本部署。通过提高滚动构建的频度就可以代替代码门禁，保障代码主干及时发现并解决问题。</p> 
<hr> 
<p>84、下面关于方舟字节码格式PREF_IMM16_V8_V8描述正确的是</p> 
<p>​ A、8位操作码，8位立即数，2个8位寄存器</p> 
<p>​ B、16位前缀操作码，16位立即数，8位寄存器</p> 
<p>​ <code>C、16位前缀操作码，16位立即数，2个8位寄存器</code></p> 
<p>​ D、8位操作码，8位立即数，16位id，8位寄存器</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/arkts-bytecode-fundamentals-V5#%E5%AD%97%E8%8A%82%E7%A0%81%E6%A0%BC%E5%BC%8F%E8%AF%B4%E6%98%8E" rel="nofollow">方舟字节码基本原理-学习ArkTS语言-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>85、以下哪些赋值语句在ArkTS中是合法。</p> 
<pre data-index="4" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">class</span> <span class="token class-name"><span class="token constant">A</span></span> <span class="token punctuation">{<!-- --></span>
  v<span class="token operator">:</span> <span class="token builtin">number</span> <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">class</span> <span class="token class-name"><span class="token constant">B</span></span> <span class="token keyword">extends</span> <span class="token class-name"><span class="token constant">A</span></span> <span class="token punctuation">{<!-- --></span>
  u<span class="token operator">:</span> <span class="token builtin">string</span> <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">class</span> <span class="token class-name"><span class="token constant">C</span></span> <span class="token punctuation">{<!-- --></span>
  v<span class="token operator">:</span> <span class="token builtin">number</span> <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">let</span> a1<span class="token operator">:</span> <span class="token constant">A</span> <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name"><span class="token constant">C</span></span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">let</span> a2<span class="token operator">:</span> <span class="token constant">A</span> <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name"><span class="token constant">B</span></span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">let</span> a3<span class="token operator">:</span> <span class="token constant">B</span> <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name"><span class="token constant">A</span></span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">let</span> a4<span class="token operator">:</span> <span class="token constant">C</span> <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name"><span class="token constant">B</span></span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.431837;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:4,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ A、a1</p> 
<p>​ <code>B、a2</code></p> 
<p>​ C、a3</p> 
<p>​ D、a4</p> 
<hr> 
<p>86、Text组件不支持以下哪种使用方式？</p> 
<pre data-index="5" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	A</span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Entry</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct styledStringDemo <span class="token punctuation">{<!-- --></span>
  scroll<span class="token operator">:</span> Scroller <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Scroller</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  mutableStyledString<span class="token operator">:</span> MutableStyledString <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">MutableStyledString</span><span class="token punctuation">(</span><span class="token string">"test hello world"</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token punctuation">{<!-- --></span>
    start<span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    length<span class="token operator">:</span> <span class="token number">5</span><span class="token punctuation">,</span>
    styledKey<span class="token operator">:</span> StyledStringKey<span class="token punctuation">.</span><span class="token constant">FONT</span><span class="token punctuation">,</span>
    styledValue<span class="token operator">:</span> <span class="token keyword">new</span> <span class="token class-name">TextStyle</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> fontColor<span class="token operator">:</span> Color<span class="token punctuation">.</span>Pink <span class="token punctuation">}</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  controller1<span class="token operator">:</span> TextController <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">TextController</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

  <span class="token keyword">async</span> <span class="token function">onPageShow</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">this</span><span class="token punctuation">.</span>controller1<span class="token punctuation">.</span><span class="token function">setStyledString</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>mutableStyledString<span class="token punctuation">)</span>
  <span class="token punctuation">}</span>

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">Text</span><span class="token punctuation">(</span><span class="token keyword">undefined</span><span class="token punctuation">,</span> <span class="token punctuation">{<!-- --></span> controller<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>controller1 <span class="token punctuation">}</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.431837;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:5,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="6" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	B</span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Entry</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct TextExample <span class="token punctuation">{<!-- --></span>
  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> space<span class="token operator">:</span> <span class="token number">8</span> <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">Text</span><span class="token punctuation">(</span><span class="token string">'textShadow'</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">fontSize</span><span class="token punctuation">(</span><span class="token number">9</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">fontColor</span><span class="token punctuation">(</span><span class="token number">0xCCCCCC</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">margin</span><span class="token punctuation">(</span><span class="token number">15</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'90%'</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.431837;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:6,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="7" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	C</span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Entry</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct styledStringDemo <span class="token punctuation">{<!-- --></span>
  scroll<span class="token operator">:</span> Scroller <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Scroller</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  layout<span class="token operator">:</span> TextLayoutManager <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">TextLayoutManager</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
  controller1<span class="token operator">:</span> TextController <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">TextController</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

  <span class="token keyword">async</span> <span class="token function">onPageShow</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">this</span><span class="token punctuation">.</span>controller1<span class="token punctuation">.</span><span class="token function">setLayout</span> <span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>layout<span class="token punctuation">)</span>
  <span class="token punctuation">}</span>

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">Text</span> <span class="token punctuation">(</span><span class="token keyword">undefined</span><span class="token punctuation">,</span> <span class="token punctuation">{<!-- --></span> controller<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>controller1 <span class="token punctuation">}</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.431837;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:7,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="8" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	D</span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Entry</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct SpanExample <span class="token punctuation">{<!-- --></span>
  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Flex</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> direction<span class="token operator">:</span> FlexDirection<span class="token punctuation">.</span>Column<span class="token punctuation">,</span> alignItems<span class="token operator">:</span> ItemAlign<span class="token punctuation">.</span>Start<span class="token punctuation">,</span> justifyContent<span class="token operator">:</span> FlexAlign<span class="token punctuation">.</span>SpaceBetween<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
      <span class="token function">Text</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">Span</span><span class="token punctuation">(</span><span class="token string">'In Line'</span><span class="token punctuation">)</span>
        <span class="token function">Span</span><span class="token punctuation">(</span><span class="token string">' Component'</span><span class="token punctuation">)</span>
        <span class="token function">Span</span><span class="token punctuation">(</span><span class="token string">' !'</span><span class="token punctuation">)</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">250</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">padding</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> left<span class="token operator">:</span> <span class="token number">35</span><span class="token punctuation">,</span> right<span class="token operator">:</span> <span class="token number">35</span><span class="token punctuation">,</span> top<span class="token operator">:</span> <span class="token number">35</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.431837;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:8,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ A、A</p> 
<p>​ B、B</p> 
<p>​ <code>C、C</code></p> 
<p>​ D、D</p> 
<hr> 
<p>87、当前您在开发一个ArkTS、Stage模型的HarmonyOS工程，关于当前ArkTS工程目录结构，下列选项说法错误的是？</p> 
<p>​ A、AppScope &gt; app.json5：应用的全局配置信息。</p> 
<p>​ B、oh-package.json5：描述依赖配置，如：依赖覆盖（overrides）、 依赖关系重写（overrideDependencyMap）和参数化配置（parameterFile）等。</p> 
<p>​ <code>C、build-profile.json5：应用级编译构建任务脚本。</code></p> 
<p>​ D、entry &gt; src &gt; main &gt; module.json5：Stage模型模块配置文件，主要包含HAP的配置信息、应用在具体设备上的配置信息以及应用的全局配置信息。</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/start-with-ets-stage-V5#arkts%E5%B7%A5%E7%A8%8B%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84stage%E6%A8%A1%E5%9E%8B" rel="nofollow">构建第一个ArkTS应用（Stage模型）-快速入门-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>88、当您开始开发一个应用/服务时，首先需要根据工程创建向导，创建一个新的工程，工具会自动生成对应的代码和资源模板。关于新建工程，下列选项说法正确的是？</p> 
<p>​ A、应用包名（Bundle name）必须为以点号（.）分隔的字符串，且至少包含三段，每段中仅允许使用英文字母、数字，如“com.example.myapplication”</p> 
<p>​ B、创建用于Lite Wearable设备的工程，可以选择Native C++工程模板。</p> 
<p>​ C、工程文件本地存储路径（Save location）允许包含中文字符。</p> 
<p>​ <code>D、Compatible SDK是兼容的最低API Version。</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-create-lite-project-0000001664975350-V5" rel="nofollow">创建Lite工程-工程管理-DevEco Studio | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>89、在编译构建HAP时，会从HAP模块及依赖的模块中收集资源文件，如果不同模块下的资源文件出现重名冲突时，会按照优先级进行覆盖，现在有一个HAP依赖了两个HAR，依赖配置如下所示：</p> 
<pre data-index="9" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">// oh-package.json5</span>
<span class="token punctuation">{<!-- --></span>
	<span class="token string-property property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{<!-- --></span>
		<span class="token string-property property">"dayjs"</span><span class="token operator">:</span> <span class="token string">"^1.10.4"</span>
		<span class="token string-property property">"lottie"</span><span class="token operator">:</span> <span class="token string">"^2.0.0"</span>
	<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.431837;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:9,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>在资源覆盖时，以下优先级排序正确的是（）</p> 
<p>​ A、HAP包自身模块&gt;lottie模块&gt;dayjs模块&gt;AppScope</p> 
<p>​ B、AppScope&gt;HAP包自身模块&gt;lottie模块&gt;dayjs模块</p> 
<p>​ <code>C、AppScope&gt;HAP包自身模块&gt;dayjs模块&gt;lottie模块</code></p> 
<p>​ D、HAP包自身模块&gt;dayjs模块&gt;lottie模块&gt;AppScope</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/har-package-V5#%E8%B5%84%E6%BA%90" rel="nofollow">HAR-应用程序包开发与使用-应用程序包基础知识-开发基础知识-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>90、作为一个应用开发者，想搭建运维平台，想在应用内定时读取当前的内存信息，可以通过（）接口来实现。</p> 
<p>​ A、hiLog</p> 
<p>​ B、hiChecker</p> 
<p>​ C、hiAppEvent</p> 
<p>​ <code>D、hiDebug</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/hidebug-guidelines-arkts-V5#%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E" rel="nofollow">使用Hidebug获取调试信息（ArkTS）-Hidebug使用指导-Performance Analysis Kit（性能分析服务）-调测调优-系统 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>91、如果要实现Row组件内的子元素均匀排列，且第一个元素与行首对齐，最后一个元素与行尾对齐，需要使用justifyContent的哪个枚举值</p> 
<p>​ A、<code>SpaceBetween</code></p> 
<p>​ B、End</p> 
<p>​ C、SpaceEvenly</p> 
<p>​ D、Start</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/arkts-layout-development-linear-V5#row%E5%AE%B9%E5%99%A8%E5%86%85%E5%AD%90%E5%85%83%E7%B4%A0%E5%9C%A8%E6%B0%B4%E5%B9%B3%E6%96%B9%E5%90%91%E4%B8%8A%E7%9A%84%E6%8E%92%E5%88%97" rel="nofollow">线性布局 (Row/Column)-构建布局-开发布局-UI开发 (ArkTS声明式开发范式)-ArkUI（方舟UI框架）-应用框架 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>92、在一个包含多个模块（如entry、feature、 service、 <span class="words-blog hl-git-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.10283&quot;,&quot;extra&quot;:&quot;{\&quot;words\&quot;:\&quot;library\&quot;}&quot;}" data-tit="library" data-pretit="library">library</span>等）的大型HarmonyOS应用项目中，如果某个模块feature对另外一个公共库模块library有依赖，如何通过DevEco Studio正确配置项目依赖关系</p> 
<p>​ A、在feature的build-profile.json5文件的dependencies字段中配置library的依赖</p> 
<p>​ <code>B、在feature的oh-package.json5文件的dependencies字段中配置library的依赖</code></p> 
<p>​ C、无需配置，直接在代码中编写import xxx from ‘library’</p> 
<p>​ D、在library的oh-package.json5文件的dependencies字段中配置feature的依赖</p> 
<hr> 
<p>93、开发者小李遇到了一个复杂的问题，该问题仅在特定的代码执行路径上出现，且难以复现。他使用的是C++进行核心算法开发，代码的逻辑密集且对性能要求极高，DevEco Studio为C/C++开发者提供的高级调试能力，以下哪个能力可以帮助小李查看代码历史执行路径，回溯到关键的变量状态</p> 
<p>​ A、代码静态分析：提供静态代码检查工具，通过语法和逻辑分析帮助预防潜在错误，但不涉及运行时问题定位</p> 
<p>​ B、传统调试模式：仅允许在当前断点暂停代码执行，查看调用堆栈和当前变量信息，但无法追溯历史执行状态</p> 
<p>​ <code>C、反向调试能力：允许开发者在调试过程中回退回到之前的代码行或断点,不仅查看过去的堆栈信息，还能重现历史的全局、静态和局部变量状态，帮助深入理解代码历史行为，特别是对于复杂逻辑和难以复现的bug定位至关重要</code></p> 
<p>​ D、实时代码修改与运行时效果查看：支持在调试过程中修改代码并立即查看修改效果，适用于快速迭代，但不聚焦于问题追溯</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-debug-native-reverse-0000001814396465-V5" rel="nofollow">反向调试-Native代码调试-代码调试-应用/服务调试-DevEco Studio | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>94、在开发HarmonyOS应用工程时，随着业务的发展，现在需要创建一个模块，关于在DevEco Studio中创建Module，下列选项哪种方式是错误的？</p> 
<p>​ A、鼠标移到工程目录顶部，单击鼠标右键，选择New &gt; Modul…，开始创建新的Module，此时该module将创建在工程根目录下。</p> 
<p>​ B、在工程根目录下创建一 个新的Directory, 可在该目录下单击鼠标右键， 选择New &gt; Module… 创建新的Module，此时module将创建在该文件目录下。</p> 
<p>​ C、选中工程目录中任意文件， 然后在菜单栏选择File &gt;New &gt; Module… ，开始创建新的Module，此时该module将创建在工程根目录下。</p> 
<p>​ <code>D、在hvigor目录下，单击鼠标右键，选择New &gt; Module... 创建新的Module，此时module将创建在该文件目录下。</code></p> 
<hr> 
<p>95、一个应用项目工程中，模块依赖关系如下图所示，那么在最终编译结果.app文件中，存在的编译产物是：</p> 
<p><img src="https://i-blog.csdnimg.cn/direct/f900482bdc2745a1a0320e957f01715e.png#pic_center" alt="在这里插入图片描述"></p> 
<p>​ A、A.hap + B.har + D.hsp</p> 
<p>​ B、A.hap + B.har + C.har + D.hsp</p> 
<p>​ C、A.hap + D.hsp + C.har</p> 
<p>​ <code>D、A.hap + D.hsp</code></p> 
<hr> 
<p>96、小华正在使用DevEco studio开发一款基于HarmonyOS的ArkUI应用，该应用需要实现一个功能，即当用户点击按钮时，通过ArkTS/JS API调用系统的分享功能。小华对具体的API调用细节不太熟悉，如何通过DevEco Studio快速查阅相关的API文档。</p> 
<p>​ A、小华在代码编辑区直接键入分享功能相关的API调用代码，如arkuigetShare()，然后按F1键，期望编辑器能自动跳转到该API的文档页面。</p> 
<p>​ <code>B、小华将鼠标悬停在编辑器中已经键入或打算键入的API调用（例如@system.router.push）上，等待编辑器自动弹出悬浮提示框，显示该API的简要信息和不同版本参数说明。随后，点击提示框右下角的“Show in API Reference”链接，直接跳转到详尽的API参考文档页面。</code></p> 
<p>​ C、小华右键点击代码编辑区，选择“Find Usages”选项，试图从其他地方引用该API的实例中学习如何使用分享功能。</p> 
<p>​ D、小华应该先停止编码工作，打开浏览器，手动搜索关键词“HarmonyOS ArkUI分享API”， 在官方网站的文档页面中寻找相关API的使用方法。</p> 
<hr> 
<p>97、WebSocket连接开发步骤描述错误的是</p> 
<p>​ A、根据URL地址， 发起WebSocket连接</p> 
<p>​ B、(可选)订阅WebSocket的打开、消息接收、关闭、Error事件</p> 
<p>​ C、导入需要的webSocket模块</p> 
<p>​ D、创建一个WebSocket连接 ，返回一个WebSocket对象</p> 
<p>​ <code>E、调用Session.start方法开启metadata数据输出</code></p> 
<p>​ F、使用完WebSocket连接之后，主动断开连接</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/websocket-connection-V5#%E5%BC%80%E5%8F%91%E6%AD%A5%E9%AA%A4" rel="nofollow">WebSocket连接-Network Kit数据传输能力-Network Kit（网络服务）-网络-系统 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>98、关于静态检查描述错误的是</p> 
<p>​ <code>A、静态检查可以检测代码中的语法错误和潜在的逻辑错误，也支持检测代码在运行时现的错误，因此静态检查可以替代动态测试。</code></p> 
<hr> 
<p>99、关于长时任务开发使用的接口是</p> 
<p>​ <code>A、使用startBackgroundRunning申请任务，使用stopBackgroundRunning取消任务</code></p> 
<hr> 
<p>100、张工在使用DevEco Studio开发HarmonyOS应用时，遇到了代码编译警告和错误，为了提高开发效率，哪一项正确描述了张工如何利用DevEco Studio的“Quick Fix”功能来有效管理和修复代码中的问题？（）</p> 
<p>​ <code>A、张工通过双击Shift键打开搜索框入"problems"打开问题工具面板，双击具体告警条目可直接跳转到问题代码行。接着，将光标置于告警位置，利用弹出的悬浮窗选择合适的修复建议或点击"More actions"以查看更多修复选项</code></p> 
<hr>
                